<div class="col-sm-12 mt20">

    <div class="panel panel-default">

        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-xs-2 text-center">活动ID/名称</th>
                        <th class="col-xs-2 text-center">活动数量</th>
                        <th class="col-xs-2 text-center">活动规则</th>
                        <th class="col-xs-3 text-center">领取规则</th>
                        <th class="col-xs-1 text-center">活动状态</th>
                        <th class="col-xs-2 text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="activity in activityList">
                        <td class="text-center">
                            {{activity.subsidy_id}}
                            <br />{{activity.subsidy_name}}
                        </td>
                        <td class="text-center">
                            总量：{{activity.subsidy_total}}{{activity.subsidy_unit == '1'? '人/次': '金额/分'}}
                            <br />余量：{{activity.subsidy_num}}{{activity.subsidy_unit == '1'? '人/次': '金额/分'}}
                            <br />最大次数：{{activity.subsidy_type_check_flag == '1'? '不校验': '校验'}}
                        </td>
                        <td class="text-center">
                            校验标识：
                            <span ng-if="activity.subsidy_check_flag == '1'">身份证</span>
                            <span ng-if="activity.subsidy_check_flag == '2'">用户id</span>
                            <span ng-if="activity.subsidy_check_flag == '3'">openid</span>
                            <br />活动类型：
                            <span ng-if="activity.subsidy_type == '1'">按机构分配</span>
                            <span ng-if="activity.subsidy_type == '2'">不按机构分配</span>
                        </td>
                        <td class="text-center">
                            单次领取数量：{{activity.subsidy_num_once}}
                            <br />补贴活动最大领取次数：{{activity.subsidy_nums_max}}
                        </td>
                        <td class="text-center">
                            <span ng-if="activity.subsidy_state == '1'">未开始</span>
                            <span ng-if="activity.subsidy_state == '2'">进行中</span>
                            <span ng-if="activity.subsidy_state == '3'">已结束</span>
                        </td>
                        <td class="text-center">
                            <button type="button" class="btn btn-success btn-xs" ng-if="activity.subsidy_state == '1'" ng-click="start(activity)">开始</button>
                            <button type="button" class="btn btn-danger btn-xs" ng-if="activity.subsidy_state == '2'" ng-click="end(activity)">结束</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="edit(activity)">修改</button>
                            <button type="button" class="btn btn-info btn-xs" ng-if="activity.subsidy_type == '1'" ng-click="company(activity)">机构信息</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="userList(activity)">用户</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="noAllow(activity)">不允许</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>